<?php
        header("Content-type:text/html;charset=utf-8");
        $con = mysqli_connect("localhost", 'root', '', 'ksdb2');
        mysqli_set_charset($con, "utf8");
        
        $st_id = $_GET['st_id'];
        
        $ap_id = $_GET['ap_id'];
        
        $ap_name = $_GET['ap_name'];

        $ap_project  = $_GET['ap_project'];

        $sql = "INSERT INTO award_punish (ap_id, st_id, ap_project, ap_name) VALUES ('$ap_id','$st_id','$ap_project','$ap_name');";
        
        
        // 执行插入语句
        if($con->query($sql))
        {
            echo "添加成功";
        //删完回去表页面
        }
        else{
            echo "添加失败";
        }
        
        // 回到首页
        header("location:AP.php");
        mysqli_close($con);
    ?>